import { defineStore } from "pinia";

const contestMenuStore = defineStore("contestMenu", {
  state() {
    return {
      menuTop: 0, // 右击菜单数据
      menuLeft: 0,
      menuShow: false,
    };
  },
  actions: {
    showContextMenu({ top, left }: any) {
      this.menuShow = true;
      this.menuTop = top;
      this.menuLeft = left;
    },

    hideContextMenu() {
      this.menuShow = false;
    },
  },
});
export default contestMenuStore;
